 <?  
  include("sqlconnect.php");
  
 $username = $_POST['username'];
 $password = sha1($_POST['userpwd']);
 
 $query= "SELECT * FROM users where email_id = '".$username."' and password = '".$password."'";
 $result= mysql_query($query) or die(mysql_error());
  
 if((mysql_num_rows($result)) == 0)
  {
     ('Location: /theshoppingbuzz/index.html'); 

     
  }else {
  $row = mysql_fetch_object($result);
  $user_id= $row->user_id; 
  $fname = $row->user_fname;
  $lname = $row->user_lname;
  session_start();
  
  $_SESSION['usrid'] = $user_id;
  $_SESSION['fname'] = $fname;
  $_SESSION['lname'] = $lname;
  $_SESSION['loginstatus']=1;
  
  echo'sucess';
  header('Location: /customerinsight/afterlogin.html');
   
  } 
  
   
  ?>
  
  
    
  
  
  